home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Games: Greatest Hits 1996
/
Amiga Games: Greatest Hits 1996.iso
/
archive
/
userbox
/
publicdomain
/
gedscanner.lha
/
GedScanner
/
AdocScan.asm
< prev
next >
Wrap
Assembly Source File
|
1996-07-22
|
868b
|
38 lines
; GoldED scanner for autodocs, even for MUI-autodocs ;-)
; it recognizes entrys of the following form: 'ff'<docname>'/'<ENTRYNAME>
movem.l a1-a2/d1-d3,-(SP)
move.l d0,d1 ; line length
moveq.l #0,d0
moveq.l #0,d2 ; actual cursorpos
movea.l (a0),a1
cmpi.b #12,(a1)
bne end ; line have to start with formfeed
slash cmp.w d2,d1 ; don`t search after lineend
beq end
addq.w #1,d2
cmpi.b #"/",(a1)+ ; searching slash
beq entryname
bra slash
entryname move.w d2,d3 ; remember namestart offset
move.l a1,(a0) ; entry name start
entryloop cmpi.b #" ",(a1) ; searching white space
beq entryend
cmpi.b #9,(a1)
beq entryend
cmpi.b #10,(a1)+
beq entryend
cmp.w d2,d1
beq entryend
addq.w #1,d2
bra entryloop
entryend move.w d2,d0
sub.w d3,d0
end movem.l (SP)+,a1-a2/d1-d3
rts